package com.fasteat.mall.quartz;

import org.springframework.stereotype.Component;

import java.util.ArrayList;
import java.util.List;

/**
 * 任务容器
 */
@Component
public class TaskContainer {

	private List<Rule> container = new ArrayList<>(8);

	/**
	 * 将任务加载到容器里
	 * @param rule
	 */
	public void load(Rule rule) {
		container.add(rule);
	}

	/**
	 * 获取任务容器
	 * @return
	 */
	public List<Rule> getContainer() {
		return container;
	}

}
